package org.xiaov.lunasql.engine.transform.interval;

import com.alibaba.druid.sql.ast.expr.SQLCharExpr;
import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr;
import com.alibaba.druid.sql.ast.expr.SQLIntervalExpr;

/**
 * <p>
 * DefaultIntervalHandler
 * </p>
 *
 * @author lzq
 * @since 2024/12/24 16:20
 */
public class DefaultIntervalHandler implements IntervalHandler {
    @Override
    public void interval(SQLIntervalExpr x) {
        if (x.getValue() instanceof SQLIntegerExpr) {
            x.setValue(new SQLCharExpr(x.getValue() + ""));
        }
    }
}
